<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/page/share/taglib.jsp" %>
<link rel="stylesheet" type="text/css" href="css/menu.css">
<div id="top">
    <div id="logo"></div>
    <div id="top_custom">
        <security:authentication property="name"/>
        welcome!
        <security:authentication property="authorities" var="authorities"/>
        <a href="${pageContext.request.contextPath}/j_spring_security_logout" id="logout">&nbsp;&nbsp;退出</a>
        <c:forEach items="${authorities}" var="authority">
            <c:set var="a" value="${authority.authority}" scope="session"/>
        </c:forEach>
    </div>

</div>
</br></br>

<div id="menu">
    <div id="wrap">
        <div id="navigation" class="smartmenu">
            <ul>
                <li style="border-top: 8px solid rgb(177,37,38);">
                    <a href="">首页</a>
                </li>
                <li>
                    <a href="">用户资料</a>
                    <ul>
                        <c:if test="${a=='ROLE_ADMIN'}">
                            <li>
                                <form method="post" action="Person.action">
                                    <input name="personManage" type="submit" value="内部用户管理"/>
                                </form>
                            </li>
                            <li>
                                <form method="post" action="Person!userList.action">
                                    <input name="personManage" type="submit" value="普通用户管理"/>
                                </form>
                            </li>
                            <li>
                                <form method="post" action="/page/person/addPerson.jsp">
                                    <input name="personManage" type="submit" value="添加用户"/>
                                </form>
                            </li>
                        </c:if>
                        <li>
                            <form method="post" action="/page/person/changePassword.jsp">
                                <input name="uploadFile" type="submit" value="修改密码"/>
                            </form>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="">套餐</a>
                    <ul>
                        <li>
                            <form method="post" action="Meal.action">
                                <input name="allMeal" type="submit" value="全部套餐"/>
                            </form>
                        </li>
                        <c:if test="${a!='ROLE_USER'}">
                            <c:if test="${a!='ROLE_STAFF'}">
                                <li>
                                    <form method="post" action="/page/meal/OneMeal.jsp">
                                        <input name="oneMeal" type="submit" value="修改套餐"/>
                                    </form>
                                </li>
                                <li>
                                    <form method="post" action="/page/meal/AddMeal.jsp">
                                        <input name="addMeal" type="submit" value="添加套餐"/>
                                    </form>
                                </li>
                                <%-- <li>
                                    <form method="post" action="/page/meal/setMealPrice.jsp">
                                        <input name="setMealPrice" type="submit" value="修改价格"/>
                                    </form>
                                </li>--%>
                            </c:if>
                        </c:if>
                        <li>
                            <form method="post" action="/page/meal/findMeal.jsp">
                                <input name="findMeal" type="submit" value="查找套餐"/>
                            </form>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="">预约</a>
                    <ul>
                        <li>
                            <form method="post" action="/page/order/AddOrder.jsp">
                                <input name="findRoomPrice" type="submit" value="添加预约"/>
                            </form>
                        </li>
                        <c:if test="${a!='ROLE_USER'}">
                            <li>
                                <form method="post" action="Order!findNotAuditOrder.action">
                                    <input name="findNotAuditOrder" type="submit" value="查看未审核预约"/>
                                </form>
                            </li>
                        </c:if>
                        <li>
                            <form method="post" action="/page/order/findOrder.jsp">
                                <input name="findRoomPrice" type="submit" value="查找预约"/>
                            </form>
                        </li>
                        <li>
                            <form method="post" action="/page/order/CancelOrder.jsp">
                                <input name="cancelOrder" type="submit" value="取消预约"/>
                            </form>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="">网友互动</a>
                    <ul>
                        <li>
                            <form method="post" action="/page/file/uploadFile.jsp">
                                <input name="uploadFile" type="submit" value="上传文件"/>
                            </form>
                        </li>
                        <li>
                            <form method="post" action="Evaluate.action">
                                <input name="evaluate" type="submit" value="网友评价"/>
                            </form>
                        </li>
                    </ul>
                </li>
                <c:if test="${a!='ROLE_USER'}">
                <li>
                    <a href="">房间</a>
                    <ul>
                        <li>
                            <form method="post" action="RoomUsed!AllRoom.action">
                                <input name="allRooms" type="submit" value="房间列表"/>
                            </form>
                        </li>
                        <li>
                            <form method="post" action="/page/roomUsed/arrangeRoom.jsp">
                                <input name="arrangeRoom" type="submit" value="房间安排"/>
                            </form>
                        </li>
                    </ul>
                </li>
                </c:if>
                <c:if test="${a!='ROLE_USER'}">
                <li>
                    <a href="">收费</a>
                    <ul>
                        <li>
                            <form method="post" action="/page/roomUsed/calPrice.jsp">
                                <input name="calPrice" type="submit" value="计算费用"/>
                            </form>
                        </li>
                        <li>
                            <form method="post" action="/page/roomUsed/extraMoney.jsp">
                                <input name="extraMoney" type="submit" value="额外费用"/>
                            </form>
                        </li>
                        <c:if test="${a!='ROLE_STAFF'}">
                            <li>
                                <form method="post" action="/page/roomUsed/revenue.jsp">
                                    <input name="extraMoney" type="submit" value="营业额"/>
                                </form>
                            </li>
                        </c:if>
                    </ul>
                </li>
                </c:if>
                <c:if test="${a=='ROLE_ADMIN'}">
                <li>
                    <a href="">数据操作</a>
                    <ul>
                        <li>
                            <form method="post" action="page/file/DateOperation.jsp">
                                <input name="excel" type="submit" value="数据操作"/>
                            </form>
                        </li>
                    </ul>
                </li>
                </c:if>
        </div>
    </div>
</div>